<template>
  <div>
    <el-table :data="bannerList" border style="width: 100%">
      <el-table-column prop="date" label="编号"></el-table-column>
      <el-table-column prop="name" label="轮播图标题"></el-table-column>
      <el-table-column prop="address" label="图片">
        <img src alt />
      </el-table-column>
      <el-table-column prop="date" label="状态">
        <template slot-scope="scope">
          <el-button type="primary" v-if="scope.row.status==1">启用</el-button>
          <el-button type="info" v-else>禁用</el-button>
        </template>
      </el-table-column>
      <el-table-column label="操作">
        <template slot-scope="scope">
          <el-button type="primary" @click="willEdit(scope.row.id)">编辑</el-button>
          <v-delete @del="del(scope.row.id)"></v-delete>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>
<script>
import { mapGetters, mapActions } from "vuex";
export default {
  data() {
    return {
      bannerList: []
    };
  },
  props: ["flag"],
  computed: {
    ...mapGetters({})
  },
  components: {},
  methods: {
    ...mapActions({}),
    // 点击删除
    del(id) {},
    // 点击编辑
    willEdit(id) {}
  },
  mounted() {}
};
</script>
<style lang='less' scoped>
</style>